home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_IIAMAPMN.ASP < prev    next >
Encoding:
Text File  |  1999-06-03  |  4.0 KB  |  192 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <% if Session("FONTSIZE") = "" then %>
  6.     <!--#include file="iito.inc"-->
  7. <% else %>
  8.     <!--#include file="iiamaphd.str"-->
  9. <% 
  10.  
  11. On Error Resume Next 
  12.  
  13. dim path, currentobj
  14. path = Session("dpath")
  15. Session("path") = path
  16. Set currentobj = GetObject(path)
  17.  
  18. Session("SpecObj")=""
  19. Session("SpecProps")=""
  20.  
  21.  %>
  22.  
  23. <!--#include file="iiset.inc"-->
  24. <!--#include file="iisetfnt.inc"-->
  25. <%
  26.     ' Do not use top.title.Global.update flag if page is loaded into a dialog
  27.     bUpdateGlobal = false
  28. %>
  29. <HTML>
  30. <HEAD>
  31.     <TITLE></TITLE>
  32.  
  33. <SCRIPT LANGUAGE="JavaScript">
  34.     function loadHelp(){
  35.         top.title.Global.helpFileName="iipy_34";
  36.     }
  37.  
  38.  
  39.     function SetList(){
  40.         self.location.href = "iiapphd.asp"
  41.     }
  42.  
  43.     function disableDefault(dir,fromCntrl, toCntrl){
  44.         if (!dir){
  45.             if (fromCntrl.value != ""){
  46.                 toCntrl.value = fromCntrl.value;
  47.                 fromCntrl.value = "";
  48.             }
  49.         }
  50.         else{
  51.             if (toCntrl.value != ""){
  52.                 fromCntrl.value = toCntrl.value;
  53.                 toCntrl.value = "";
  54.             }
  55.         }
  56.     }
  57.  
  58.     function enableDefault(chkCntrl){
  59.         chkCntrl.checked = true;
  60.     }
  61.  
  62. </SCRIPT>
  63. </HEAD>
  64.  
  65. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000" onLoad="loadList();loadHelp();" LINK="#000000" VLINK="#000000"  >
  66. <%= sFont("","","",True) %>
  67. <B><%= L_APPMAPP_TEXT %></B><P>
  68.  
  69. <FORM NAME="userform" onSubmit="return false">
  70. <%= checkbox("CacheISAPI","",True) %><%= L_CACHEISAPI_TEXT %><P>
  71.  
  72. <SCRIPT LANGUAGE="JavaScript">
  73.     <!--#include file="iijsfuncs.inc"-->
  74.     <!--#include file="iijsls.inc"-->
  75.         
  76.     function loadList(){
  77.         parent.list.location.href = "iiamapls.asp";
  78.     }
  79.  
  80.     function buildListForm(){
  81.         numrows = 0;
  82.         for (var i = 0; i < cachedList.length; i++) {
  83.             if (!cachedList[i].deleted){        
  84.                 numrows = numrows + 1;
  85.             }
  86.         }
  87.         qstr = "numrows="+numrows;
  88.         qstr = qstr+"&cols=ScriptMaps";
  89.  
  90.         parent.parent.hlist.location.href = "iihdn.asp?"+qstr;
  91.         <% 'the list values will be grabbed by the hiddenlistform script... %>
  92.     }
  93.  
  94.     function SetListVals(){
  95.         listForm = parent.parent.hlist.document.hiddenlistform;    
  96.         j = 0;
  97.         for (var i = 0; i < cachedList.length; i++) {
  98.             sm = 0;
  99.             cf = 0;
  100.             if (!cachedList[i].deleted){
  101.                 str = cachedList[i].ext + ",";
  102.                 str += cachedList[i].path + ",";
  103.  
  104.                 if (cachedList[i].scripteng){
  105.                     sm = 1;
  106.                 }
  107.                 if (cachedList[i].checkfiles){
  108.                     cf = 4;
  109.                 }
  110.                 str += (sm + cf);
  111.                 
  112.                 if (cachedList[i].exclusions != ""){
  113.                     str +=  "," + cachedList[i].exclusions;
  114.                 }
  115.                 
  116.                 listForm.elements[j++].value = str;
  117.                 cachedList[i].updated = false;
  118.             }
  119.         }
  120.     }
  121.  
  122.     function listObj(i,ext,p,f,e){
  123.         this.id = i;
  124.  
  125.         this.deleted = false;
  126.         this.newitem = false;
  127.         this.updated = false;
  128.  
  129.         
  130.         this.ext = initParam(ext,"");
  131.         this.path = initParam(p,"");
  132.         f = initParam(f,0);
  133.         this.exclusions=initParam(e,"");
  134.  
  135.  
  136.         this.checkfiles = (f & 4) > 0;
  137.         this.scripteng = (f & 1) > 0;        
  138.         this.displaypath = crop(this.path,35);
  139.     }
  140.  
  141. listFunc = new listFuncs("fname","",top.opener.top);
  142. cachedList = new Array();
  143.  
  144. <% 
  145.  
  146.     dim i,Script,aScriptMap,aScript
  147.  
  148.     aScriptMap = currentobj.ScriptMaps
  149.     i = 0
  150.     For Each Script in aScriptMap
  151.         if Script <> "" then
  152.             aScript = GetScriptArray(Script)
  153.             %>cachedList[<%= i %>] = new listObj(<%= i %>,"<%= aScript(0) %>","<%= Replace(aScript(1),"\","\\") %>",<%= aScript(2) %>,"<%= aScript(3) %>");<% 
  154.             i = i+1
  155.         end if 
  156.     Next
  157.     
  158.     function GetScriptArray(ScriptStr)
  159.         dim a,b,c,d,one,two,three
  160.  
  161.         a = ""
  162.         b = ""
  163.         c = 0
  164.         d = ""
  165.  
  166.         one=Instr(ScriptStr,",")
  167.         two=Instr((one+1),ScriptStr,",")
  168.         three=Instr((two+1),ScriptStr,",")
  169.     
  170.  
  171.         if one > 0 then
  172.             a=Mid(ScriptStr,1,(one-1))
  173.             b=Mid(ScriptStr,(one+1),((two-one)-1))
  174.  
  175.             if three <> 0 then
  176.                 c=Mid(ScriptStr,(two+1),((three-two)-1))
  177.                 d=Mid(ScriptStr,(three+1))
  178.             else
  179.                 c=Mid(ScriptStr,(two+1))
  180.             end if
  181.         end if
  182.     
  183.         GetScriptArray=Array(a,b,c,d)
  184.     end function
  185.     
  186.  %>
  187.  
  188.  
  189. </SCRIPT>
  190. </BODY>
  191. </HTML>
  192. <% end if %>